﻿@using Neptuo.Web.Mvc
@{
    ViewBag.HomeActiveClass = ViewContext.RouteData.GetController() == "home" && ViewContext.RouteData.GetAction() == "index" ? "heading-active" : "";
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>@ViewBag.Title</title>
    
        @Stylesheet.Include("~/Design/Styles/Common.css")
        @Stylesheet.Include("~/Design/Styles/Design.css")
        @Stylesheet.Include("~/Design/Styles/chosen.css")

        @Javascript.Include("~/Design/Scripts/jquery-1.7.1.min.js")
        @Javascript.Include("~/Design/Scripts/jquery.validate.min.js")
        @Javascript.Include("~/Design/Scripts/jquery.validate.unobtrusive.min.js")
        @Javascript.Include("~/Design/Scripts/jquery-ui-1.8.18.min.js")
        @Javascript.Include("~/Design/Scripts/chosen.jquery.js")

        @RenderSection("HtmlHead", false)
    </head>

    <body>
        <div class="all">
            <div class="head">
                <div class="left">
                    <a class="heading @ViewBag.HomeActiveClass" href="@Url.Content("~/")">
                        <span>FormService</span>
                    </a>

                    @UI.Menu("MainMenu", "MainMenu")
                </div>
                <div class="right">
                    <a class="by-neptuo" target="_blank" href="http://www.neptuo.com">
                        <span>by Neptuo</span>
                    </a>
                    <div class="langs">
                        <a href="?lang=cs"><img src="@Url.Content("~/Design/Images/Langs/cs.png")" /></a>
                        <a href="?lang=en"><img src="@Url.Content("~/Design/Images/Langs/en.png")" /></a>
                    </div>
                    <div class="clear"></div>

                    @UI.Menu("AdminMenu", "AdminMenu")
                </div>
                <div class="clear"></div>
            </div>
            <div class="body">
                @UI.Message(Message)

                <div class="content@(IsSideBar() ? " content-narrow" : "")">

                    @if (UserContext.IsAuthenticated())
                    { 
                        @Html.Action("MyInvitations", "Project");
                    }

                    @RenderBody()

                    <div class="clear"></div>
                </div>
                @if (IsSideBar())
                {
                    <div class="side-bar right">
                        @if (IsSectionDefined("SideBar"))
                        { 
                            @RenderSection("SideBar");
                        }
                        else
                        { 
                            @RenderSection("SideBarTop", false)

                            if (UserContext.IsAdmin())
                            { 
                                <div class="folder">
                                    <h4 class="folder-heading">@Loc("Admin menu")</h4>
                                    
                                    @UI.Menu("SuperAdminMenu", "SideBarMenu")
                                </div>
                            }

                            <div class="folder">
                                <h4 class="folder-heading">@Loc("Version")</h4>
                                In development
                            </div>
                        }
                    </div>
                }
                <div class="clear"></div>
            </div>
        </div>
        <div class="foot">
            <div class="foot-in">
                <div class="left">
                    FormService, Neptuo &copy; 2010 - 2012
                </div>
                <div class="right">
                    Created by <a target="_blank" href="http://people.neptuo.com/mara">Marek Fišera</a>
                </div>
                <div class="clear"></div>
            </div>
        </div>

        <script type="text/javascript">

            $(function () {
                $('select').chosen();
                $('.confirm').click(function(e) {
                    return confirm($(this).attr('data-confirm'));
                });

                @RenderSection("JavascriptDomReady", false)
            });
        
            @RenderSection("JavascriptInline", false)
        </script>
    </body>
</html>
 